home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 2004 #11
/
Amiga Plus CD - 2004 - No. 11.iso
/
AmiSoft
/
Dev
/
misc
/
temgen.lha
/
Temgen
/
tg-0.11
/
frame.c
< prev
next >
Wrap
C/C++ Source or Header
|
2002-12-18
|
445b
|
25 lines
#include "frame.h"
#include "omani.h"
static int _next_free = 1;
int frame_alloc( int Frames )
{
int res;
/* FIXME ! - better memory allocation ! */
res = ob_item( Frames, _next_free++ );
return res;
}
void frame_free( int Frames, int obj )
{
int last;
/* FIXME ! - better deallocation */
ob_set( obj, 'i', 0 );
last = ob_item( Frames, _next_free-1 );
if ( last == obj )
_next_free--;
}